﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dukou.Dao;
using Dukou.Domain;

namespace Dukou.BizService
{
    public interface IEnumerationBizService : IEntityBizService<IEnumerationDao, Enumeration, Int64>
    {
        /// <summary>
        /// 保存枚举分类
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        Int64 Save(EnumerationCategory category);

        /// <summary>
        /// 保存或更新枚举分类
        /// </summary>
        /// <param name="category"></param>
        void SaveOrUpdate(EnumerationCategory category);

        /// <summary>
        /// 更新枚举分类
        /// </summary>
        /// <param name="category"></param>
        void Update(EnumerationCategory category);

        /// <summary>
        /// 删除枚举分类
        /// </summary>
        /// <param name="entity"></param>
        void Delete(EnumerationCategory entity);

        /// <summary>
        /// 获取枚举分类
        /// </summary>
        /// <param name="id">枚举分类 Id</param>
        /// <returns></returns>
        EnumerationCategory FindCategoryById(Int64 id);

        /// <summary>
        /// 获取枚举分类
        /// </summary>
        /// <param name="name">枚举分类名称</param>
        /// <returns></returns>
        EnumerationCategory FindCategoryByName(string name);

        /// <summary>
        /// 获取枚举
        /// </summary>
        /// <param name="category">枚举分类名称</param>
        /// <returns></returns>
        IList<Enumeration> SelectByCategory(string category);

        /// <summary>
        /// 获取枚举
        /// </summary>
        /// <param name="category">枚举分类</param>
        /// <returns></returns>
        IList<Enumeration> SelectByCategory(EnumerationCategory category);
    }
}
